package demo;

import java.util.concurrent.Semaphore;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ASUS
 * Date: 2025-02-26
 * Time: 18:20
 */
public class Demo11 {
    public static void main(String[] args) throws InterruptedException {
        Semaphore semaphore = new Semaphore(4);
         semaphore.acquire();
        System.out.println("执行 P 操作");
        semaphore.release();
        System.out.println("执行 V 操作");
    }
}
